package com.linkq.ipinyin.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author wangpeng
 * @since 2025-06-29
 **/

@ApiModel("向Apple校验的所有返回结果")
@Data
public class AppleResponse  implements Serializable {
    @ApiModelProperty("交易环境：可能的值：Sandbox, Production")
    private String environment;

    @ApiModelProperty("交易环境：可能的值：Sandbox, Production")
    private AppleReceipt receipt;

    @ApiModelProperty("如果收据有效，或者0如果有错误，则返回状态代码。状态码反映了整个应用收据的状态。")
    private String status;

    private pendingRenewalInfo[] pending_renewal_info;

    private String latest_receipt;

    @Getter
    @Setter
    static
    class pendingRenewalInfo {
        private String auto_renew_product_id;
        private String original_transaction_id;
        private String product_id;
        private String auto_renew_status;
    }
}
